package com.ljl.yishu.net;

public class ResponseCode {

    public static String getCodeDetail(String code) {

        int code_int = Integer.parseInt(code);

        String codeDetail = null;

        switch (code_int) {
            case 0:
                codeDetail = "成功";
                break;
            case 1:
                codeDetail = "未登录";
                break;
            case 2:
                codeDetail = "密码错误";
                break;
            case 3:
                codeDetail = "用户不存在";
                break;
            case 4:
                codeDetail = "操作超时";
                break;
            case 5:
                codeDetail = "操作失败";
                break;
            case 6:
                codeDetail = "系统错误";
                break;
            case 7:
                codeDetail = "令牌无效";
                break;
            case 8:
                codeDetail = "分类名称为空";
                break;
            case 9:
                codeDetail = "分类不能删除";
                break;
            case 10:
                codeDetail = "该用户下已经存在同名分类";
                break;
            case 11:
                codeDetail = "无法获得参数/参数为空";
                break;
            case 12:
                codeDetail = "参数不合法/非有效参数";
                break;
            case 400:
                codeDetail ="客户端异常";
                break;
            case 500:
                codeDetail ="服务器异常";
                break;
            case 600:
                codeDetail ="未知异常";
                break;

        }


        return codeDetail;

    }

}
